/*
 * FreeEdit.h
 * Authors: 107 <107@mail.ru>
 * License: GPL >=2.0
 *
 *
 */

#ifndef FREEEDIT_H_
#define FREEEDIT_H_



#include <FApp.h>
#include <FBase.h>
#include <FSystem.h>
#include <FUi.h>

#include "MainForm.h"
#include "FileDialog.h"
#include "EditorForm.h"
#include "InheritanceContainer.h"

class FreeEdit :
	public Osp::App::Application,
	public Osp::System::IScreenEventListener,
	public badadev::InheritanceContainer
{
private:
	Osp::Ui::Controls::Frame *pFrame;
	MainForm *pMainForm;
	EditorForm *pEditor;
	badadev::FileDialog *pFileDialog;

public:

	FreeEdit();
	~FreeEdit();

	static Osp::App::Application* CreateInstance( void );
	void receiveContainerActionFromChild( const int actionId, InheritanceContainer &child );

	// Called when the application is initializing.
	bool OnAppInitializing(Osp::App::AppRegistry& appRegistry);

	// Called when the application is terminating.
	bool OnAppTerminating(Osp::App::AppRegistry& appRegistry, bool forcedTermination = false);

	// Called when the application's frame moves to the top of the screen.
	void OnForeground(void);

	// Called when this application's frame is moved from top of the screen to the background.
	void OnBackground(void);

	// Called when the system memory is not sufficient to run the application any further.
	void OnLowMemory(void);

	// Called when the battery level changes.
	void OnBatteryLevelChanged(Osp::System::BatteryLevel batteryLevel);

	// Called when the screen turns on.
	void OnScreenOn (void);

	// Called when the screen turns off.
	void OnScreenOff (void);

};



#endif /* FREEEDIT_H_ */
